<%--
  Created by IntelliJ IDEA.
  User: yanchao
  Date: 2021/11/7
  Time: 下午3:49
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>修改密码 - 助学贷款系统</title>
    <link rel="stylesheet" href="./static/layui/css/layui.css">
    <link rel="stylesheet" href="./static/admin/css/style.css">
    <script src="./static/js/jquery-3.3.1.min.js"></script>
    <script src="./static/admin/js/userConfig.js"></script>
</head>
<body class="p20">

<fieldset class="layui-elem-field layui-field-title">
    <legend>修改密码</legend>
</fieldset>



<div class="layui-form-item">
    <label class="layui-form-label">新密码</label>
    <div class="layui-input-block">
        <input type="password" id="pwd1" class="layui-input">
    </div>
</div>
<div class="layui-form-item">
    <label class="layui-form-label">重复新密码</label>
    <div class="layui-input-block">
        <input type="password" id="pwd2" class="layui-input">
    </div>
</div>
<div class="layui-form-item">
    <div class="layui-input-block" style="text-align: center;">
        <button class="layui-btn" onclick="check(${sessionScope.user.id})">立即提交</button>

    </div>
</div>


<script>
    function check(id)
    {
        var v1=document.getElementById("pwd1").value;
        var v2=document.getElementById("pwd2").value;
        if (v1 !='' && v1==v2){
            window.location.href="userPwd.do?id="+ id +"&password="+ v1;
        }
        else{
            alert("两次密码输入不一致或输入为空，请重新输入");
        }
    }
</script>
</body>
</html>
